package com.lzw.breezeNovel.webApp;

import com.lzw.breezeNovel.webApp.message.NettyWebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp
 * @date 2025/2/27
 * @description webApp启动类
 */
@EnableAsync
@EnableScheduling
@SpringBootApplication
@SuppressWarnings("all")
public class WebApp implements CommandLineRunner {

    @Autowired
    private NettyWebSocketServer nettyWebSocketServer;

    public static void main(String[] args) {
        SpringApplication.run(WebApp.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        // 启动服务
        nettyWebSocketServer.start();
    }
}